<?php

class Ingenii_Config extends Ingenii_Core {
	
	private static $instance;
	
	public function __get($configfile) {
		if(!isset($this->$configfile)) {
			$this->$configfile = new Zend_Config_Ini(BASEPATH . "/config/$configfile.ini", APPLICATION_ENV );
		}
		return $this->$configfile;
	}
	
	public static function getInstance() {
        if (!Ingenii_Config::$instance instanceof self) {
            Ingenii_Config::$instance = new self();
        }
        return Ingenii_Config::$instance;
    }	
}

class Ingenii_Config_Exception extends Exception {}